package UserClass.ArrayClass;

public class demoArray01 {
    public static void main(String[] args) {
        //首先创建一个长度为3的数组，存放Person对象的数组
Person[] array= new Person[3];
Person one = new Person("dili",18);
Person two = new Person("dsd",20);
Person three = new Person("dsd",55);
//讲
array[0]=one;
array[1]=two;
array[2]=three;
        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println(array[2]);
        System.out.println(array[1].getName());//dsd
    }
}
